const arr1 = [1, 2, 3]
const arr2 = [4, 5, 6, 7]
const arr3 = [...arr1, ...arr2]

// 克隆对象
const obj1 = {
  name: 'yk',
  age: '11',
}
const obj2 = {
  school: 'mooc',
}

// 深克隆
const obj3 = { ...obj1 }
//合并
obj4 = { ...obj2, ...obj1 }

const obj5 = {
  name: 'yk',
  age: 11,
  school: 'mooc',
  course: 'es',
}

const { name, age, ...rest } = obj5
console.log(rest) // {school: 'mooc',course: 'es'} //!必须放在最后
